package main
import (
    "database/sql"
	_ "github.com/go-sql-driver/mysql"
)
const (
    //user:password@tcp(localhost:5555)/dbname?charset=utf8
    DB_Driver = "root:root@tcp(149.129.87.36:3306)/bus_database?charset=utf8"
)

func OpenDB() (success bool, db *sql.DB) {
    var isOpen bool
    db, err := sql.Open("mysql", DB_Driver)
    if err != nil {
        isOpen = false
    } else {
        isOpen = true
    }
    checkError(err)
    return isOpen, db
}
